<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-08-30 14:29:16
 * @LastEditTime: 2019-09-12 11:00:29
 * @LastEditors: Please set LastEditors
 -->
{namespace n=GeorgRinger\News\ViewHelpers}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
	<f:layout name="Default" />

	This Template is responsible for creating a table of domain objects.

	If you modify this template, do not forget to change the overwrite settings
	in /Configuration/ExtensionBuilder/settings.yaml:
	Resources:
	Private:
	Templates:
	List.html: keep

	Otherwise your changes will be overwritten the next time you save the extension in the extension builder

	<f:section name="content">
		<div class="portlet light ">
			<div class="portlet-title">
				<div class="caption">
					<f:link.action action="list" arguments="{excelExport:1}" class="btn btn-default">导出
					</f:link.action>
				</div>
				<div class="actions">
					<div class="btn-group btn-group-devided">
						<f:form class="form-inline" action="list" object="{search}" name="search">
							<div class="input-group">
								<f:form.select class="form-control" name="province" options="{arrArea}"
									optionValueField="uid" optionLabelField="name" prependOptionLabel="--请选择--"
									value="{province}" />
							</div>
							<div class="input-group">
								<div class="input-icon">
									<input type="hidden" name="id" value="{pageUid}" />
									<i class="fa fa-search"></i>
									<!-- <f:form.textfield property="keyword" value="{keyword}" class="form-control" placeholder="请输入查询条件" /> -->
									<f:form.textfield name="keyword" value="{keyword}" class="form-control"
										placeholder="请输入查询条件" />
								</div>
								<span class="input-group-btn">
									<f:form.submit class="btn btn-success" value="搜" />
								</span>
							</div>
						</f:form>
					</div>
				</div>
			</div>
			<f:widget.paginate objects="{volunteers}" as="volunteerPagination" configuration="{settings.paginate}">
				<div class="portlet-body">
					<div class="table-scrollable">
						<table class="table table-hover table-light">
							<thead>
								<tr class="uppercase">
									<th></th>
									<th>序号</th>
									<th>姓名</th>
									<th>性别</th>
									<th>电话</th>
									<th>邮箱</th>
									<th>政治面貌</th>
									<th>出生日期</th>
									<!-- <th>省份</th> -->
									<th class="text-center">操作</th>
								</tr>
							</thead>
							<tbody>
								<f:for each="{volunteerPagination}" as="volunteer" iteration="itemIteration1">
									<tr>
										<td>
											<label class="mt-checkbox mt-checkbox-outline">
												<input type="checkbox" value="{volunteer.uid}" name="test"
													class="normal sel" />
												<span></span>
											</label>
										</td>
										<td>
											{f:cObject(typoscriptObjectPath:'lib.calc',
											data:'{itemIteration1.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
										</td>
										<td>
											<f:link.action action="show" arguments="{volunteer : volunteer}">{volunteer.name}
											</f:link.action>
										</td>
										<td>
											{volunteer.sex.name}
										</td>
										<td>{volunteer.telephone}</td>
										<td>
											{volunteer.email}
										</td>
										<td>
											{volunteer.identity.name}
										</td>
										<td>
											{volunteer.birthday -> f:format.date(format:'Y-m-d')}
										</td>
										<!-- <td>
											{volunteer.province.name}
										</td> -->
										<td class="text-center">
											<f:link.action action="edit" arguments="{volunteer : volunteer}"
												class="btn btn-info btn-xs edit">编辑</f:link.action>
											<f:link.action action="delete" arguments="{volunteer : volunteer}"
												class="btn btn-danger btn-xs delete btn-del">删除</f:link.action>
										</td>
									</tr>
								</f:for>
								<tr>
									<td>
										<label class="mt-checkbox mt-checkbox-outline">
											<input type="checkbox" name="test" class="normal selectall" />
											<span></span>
										</label>
									</td>
									<td colspan="6">
										<f:form action="multidelete" name="datas">
											<f:form.hidden id="multidelete-items" property="items" value="" />
											<f:form.submit value="删除选中"
												class="btn btn-danger btn-xs delete btn-del btn-delete-all" />
										</f:form>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</f:widget.paginate>
		</div>

		<f:flashMessages />
		<script type="text/javascript" src="{f:uri.resource(path:'JavaScript/com.js?123456789')}"></script>
	</f:section>

</html>